package mouseEvents;

import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;

import javax.imageio.ImageIO;
import javax.swing.JComponent;

public class ImageC extends JComponent {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	BufferedImage img;
	public ImageC() {
		try {
			img = ImageIO.read(new File("images.jpg"));
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
	public void paintComponent(Graphics g){
		super.paintComponent(g);
		Graphics2D g2 = (Graphics2D) g;
		g2.drawImage(img, 0, 0, null);
		
		
	}
	
}
